package com.smart.home.system;

public class Result {
	
	/**
	 * 系统错误
	 */
	public static final int ERROR= -999;
	
	/**
	 * 成功
	 */
	public static final int SUCC= 0;

	/**
	 * 失败
	 */
	public static final int FAIL= -1;
	
	/**
	 * 没有注册
	 */
	public static final int NO_REG= -2;
	
	/**
	 * 缺少参数
	 */
	public static final int NO_PARAM = -3;
	
	/**
	 * 没有登陆
	 */
	public static final int NO_USER = -4;
	
	/**
	 * 没有传入对象
	 */
	public static final int NO_OBJ = -5;
	
	/**
	 * 保存消息失败
	 */
	public static final int SAVEMSG_FAIL = -6;
	
	/**
	 * 更新用户未读消息失败
	 */
	public static final int UPDATEUNREADMSG_FAIL = -7;
	
	/**
	 * 没有找到该药店
	 */
	public static final int NO_STORE = -8;

	/**
	 * 获取AppService Url地址失败
	 */
	public static final int GETURL_FAIL = -9;
	
	/**
	 * 方法执行失败
	 */
	public static final int EXECUTEMETHOD_FAIL = -10;

	/**
	 *方法执行是否成功
	 */
	private int resultCode =FAIL;
	
	/**
	 * 提示信息
	 */
	
	private String msg = "";
	/**
	 * 其他信息
	 */
	private Object result= null;
	
	
	public Result(int resultCode, String msg, Object result) {
		super();
		this.resultCode = resultCode;
		this.msg = msg;
		this.result = result;
	}
	
	public Result(int resultCode, String msg) {
		super();
		this.resultCode = resultCode;
		this.msg = msg;
	}

	public Result(int resultCode) {
		super();
		this.resultCode = resultCode;
	}

	public Result(int resultCode, Object result) {
		super();
		this.resultCode = resultCode;
		this.result = result;
	}

	public Result() {
		super();
	}

	public int getResultCode() {
		return resultCode;
	}
	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getResult() {
		return result;
	}
	public void setResult(Object result) {
		this.result = result;
	}
	
	
}
